package com.jshoperxms.controller.utils.enums;

/**
 * Created by sdywcd on 16/11/20.
 * Des:
 */
public class MemberEnums {

    public enum MemberRechargeType {
        ALIPAY("支付宝", "1"), WECHATPAY("微信支付", "2"),UNIONBANK("网银","3"),SYS("系统代充","4");

        private String name;
        private String state;

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getState() {
            return state;
        }

        public void setState(String state) {
            this.state = state;
        }

        private MemberRechargeType(String name, String state) {
            this.name = name;
            this.state = state;
        }

        public static String getName(String tag) {
            for (MemberRechargeType d : MemberRechargeType.values()) {
                if (d.getState().equals(tag)) {
                    return d.getName();
                }
            }
            return "";
        }
    }

    public enum MemberWithdrawalsReviewed {
        PASS("通过", "1"), NO("未审核", "0"),REJECT("驳回","2");

        private String name;
        private String state;

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getState() {
            return state;
        }

        public void setState(String state) {
            this.state = state;
        }

        private MemberWithdrawalsReviewed(String name, String state) {
            this.name = name;
            this.state = state;
        }

        public static String getName(String tag) {
            for (MemberWithdrawalsReviewed d : MemberWithdrawalsReviewed.values()) {
                if (d.getState().equals(tag)) {
                    return d.getName();
                }
            }
            return "";
        }
    }

    public enum MemberWithdrawalsTransfer {
        HAVETRANSFER("已转账", "1"), NO("未转账", "0");

        private String name;
        private String state;

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getState() {
            return state;
        }

        public void setState(String state) {
            this.state = state;
        }

        private MemberWithdrawalsTransfer(String name, String state) {
            this.name = name;
            this.state = state;
        }

        public static String getName(String tag) {
            for (MemberWithdrawalsTransfer d : MemberWithdrawalsTransfer.values()) {
                if (d.getState().equals(tag)) {
                    return d.getName();
                }
            }
            return "";
        }
    }


    /**
     * 会员数据状态
     *
     * @author sdywcd
     *
     */
    public enum MemberState {
        ACTIVE("激活", "1"), UNACTIVE("未激活", "0"), LOCK("锁定", "2");
        private String name;
        private String state;

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getState() {
            return state;
        }

        public void setState(String state) {
            this.state = state;
        }

        private MemberState(String name, String state) {
            this.name = name;
            this.state = state;
        }

        public static String getName(String tag) {
            for (MemberState d : MemberState.values()) {
                if (d.getState().equals(tag)) {
                    return d.getName();
                }
            }
            return "";
        }
    }



    /**
     * 用户等级类型
     *
     * @ClassName: MemberGradeType
     * @Description: TODO(这里用一句话描述这个类的作用)
     * @author jcchen
     * @date 2015年3月6日 下午10:42:19
     *
     */
    public enum MemberGradeType {
        CREDITVALUE("信用值", "1"), EMPIRICALVALUE("经验值", "2");

        private String name;
        private String state;

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getState() {
            return state;
        }

        public void setState(String state) {
            this.state = state;
        }

        private MemberGradeType(String name, String state) {
            this.name = name;
            this.state = state;
        }

        public static String getName(String tag) {
            for (MemberGradeType d : MemberGradeType.values()) {
                if (d.getState().equals(tag)) {
                    return d.getName();
                }
            }
            return "";
        }
    }
    /**
     * 会员性别
     *
     * @author Seth.Wang
     * @Package com.jshoperxms.action.utils.enums
     * @ClassName: MemberSex
     * @date 2015年10月26日 下午6:00:10
     */
    public enum MemberSex {
        SECRECY("保密", "0"), MALE("男", "1"), FEMALE("女", "2");

        private String name;
        private String sex;

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getSex() {
            return sex;
        }

        public void setSex(String sex) {
            this.sex = sex;
        }

        private MemberSex(String name, String sex) {
            this.name = name;
            this.sex = sex;
        }

        public static String getName(String tag) {
            for (MemberSex f : MemberSex.values()) {
                if (f.getSex().equals(tag)) {
                    return f.getName();
                }
            }
            return "";
        }
    }

    /**
     * 会员性取向
     *
     * @author Seth.Wang
     * @Package com.jshoperxms.action.utils.enums
     * @ClassName: MemberWhichSex
     * @date 2015年10月28日 下午3:58:54
     */
    public enum MemberWhichSex {
        SECRECY("保密", "0"), MALE("男", "1"), FEMALE("女", "2");

        private String name;
        private String whichsex;

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getWhichsex() {
            return whichsex;
        }

        public void setWhichsex(String whichsex) {
            this.whichsex = whichsex;
        }

        private MemberWhichSex(String name, String whichsex) {
            this.name = name;
            this.whichsex = whichsex;
        }

        public static String getName(String tag) {
            for (MemberWhichSex f : MemberWhichSex.values()) {
                if (f.getWhichsex().equals(tag)) {
                    return f.getName();
                }
            }
            return "";
        }
    }

    /**
     * 会员血型
     *
     * @author Seth.Wang
     * @Package com.jshoperxms.action.utils.enums
     * @ClassName: MemberBlood
     * @date 2015年10月28日 下午4:04:39
     */
    public enum MemberBlood {
        SECRECY("保密", "0"), A("A", "1"), B("A", "2"), O("O", "3"), AB("AB", "4");

        private String name;
        private String blood;

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getBlood() {
            return blood;
        }

        public void setBlood(String blood) {
            this.blood = blood;
        }

        private MemberBlood(String name, String blood) {
            this.name = name;
            this.blood = blood;
        }

        public static String getName(String tag) {
            for (MemberBlood f : MemberBlood.values()) {
                if (f.getBlood().equals(tag)) {
                    return f.getName();
                }
            }
            return "";
        }
    }


    /**
     * 会员婚姻状况
     *
     * @author Seth.Wang
     * @Package com.jshoperxms.action.utils.enums
     * @ClassName: MemberMerryStatus
     * @date 2015年10月28日 下午4:04:39
     */
    public enum MemberMerryStatus {
        HAVEMERRYED("已婚", "1"), UNMERRYED("未婚", "2"),UNDEFINED("未定义","0");

        private String name;
        private String state;

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getState() {
            return state;
        }

        public void setState(String state) {
            this.state = state;
        }

        private MemberMerryStatus(String name, String state) {
            this.name = name;
            this.state = state;
        }

        public static String getName(String tag) {
            for (MemberMerryStatus f : MemberMerryStatus.values()) {
                if (f.getState().equals(tag)) {
                    return f.getName();
                }
            }
            return "";
        }
    }


    public enum MemberConstellation{
        SECRECY("保密", "0"),
        ARIES("白羊座","1"),
        TAURUS("金牛座","2"),
        GEMINI("双子座","3"),
        CANCER("巨蟹座","4"),
        LEO("狮子座","5"),
        VIRGO("处女座","6"),
        LIBRA("天秤座","7"),
        SCORPIO("天蝎座","8"),
        SAGITTARIUS("射手座","9"),
        CAPRICORN("摩羯座","10"),
        AQUARIUS ("水瓶座","11"),
        PISCES("双鱼座","12");

        private String name;
        private String constellation;
        public String getName() {
            return name;
        }
        public void setName(String name) {
            this.name = name;
        }
        public String getConstellation() {
            return constellation;
        }
        public void setConstellation(String constellation) {
            this.constellation = constellation;
        }
        private MemberConstellation(String name, String constellation) {
            this.name = name;
            this.constellation = constellation;
        }

        public static String getName(String tag) {
            for (MemberConstellation f : MemberConstellation.values()) {
                if (f.getConstellation().equals(tag)) {
                    return f.getName();
                }
            }
            return "";
        }

    }

    public enum MemberDeliverTag {
        HOME("家", "1"),COMPANY("公司","2"),OTHER("其他","0");
        private String name;
        private String state;

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getState() {
            return state;
        }

        public void setState(String state) {
            this.state = state;
        }

        private MemberDeliverTag(String name, String state) {
            this.name = name;
            this.state = state;
        }

        public static String getName(String state) {
            for (MemberDeliverTag type : MemberDeliverTag.values()) {
                if (type.getState().equals(state)) {
                    return type.getName();
                }
            }
            return "";
        }
    }

}
